query getCopilotHistories(
  $workspaceId: String!
  $docId: String
  $options: QueryChatHistoriesInput
) {
  currentUser {
    copilot(workspaceId: $workspaceId) {
      histories(docId: $docId, options: $options) {
        sessionId
        tokens
        action
        createdAt
        messages {
          id
          role
          content
          attachments
          createdAt
        }
      }
    }
  }
}
